local CommonOHOH = _G.CommonOHOH;
local M = CommonOHOH.class.new(script, CommonOHOH.files.SFAnimationBase());

function M.new(self,...)
	assert(self, "param model is nil");
	return M(self,...);
end;

function M.ctor(self, ...)
	M.super.ctor(self, ...)
end;

function M.dtor(self)
	M.super.dtor(self);
end;



function M.Init(self)
	
end

function M.PlayInit(self)
	if not self.partSize then
		self.partSize=self.main_inst.Parent.Size
	end
	self.main_inst.StudsPerTileU = self.playData.columns*self.partSize.X
	self.main_inst.StudsPerTileV = self.playData.rows*self.partSize.Z
end

function M.SpriteUpdate(self,CurrentColumn,CurrentRow)
	self.main_inst.OffsetStudsU = self.partSize.X*(CurrentColumn-1)
	self.main_inst.OffsetStudsV = self.partSize.Z*(CurrentRow-1)
end


--local function SetAnimatedSprite(c,r)
--	if isTexture then
--		AnimatedSprite.OffsetStudsU = size.X*(c-1)
--		AnimatedSprite.OffsetStudsV = size.Z*(r-1)
--	else
--		--print("++++++++UI Image++++++++++++,",c,r)
--		AnimatedSprite.Position = UDim2.new(-(c-1),0,-(r-1),0)
--	end
--end

--local function InitAnimatedSprite(c,r)
--	if isTexture then
--		AnimatedSprite.StudsPerTileU = c*size.X
--		AnimatedSprite.StudsPerTileV = r*size.Z
--	else
--		AnimatedSprite.Size = UDim2.new(c,0,r,0) 
--	end
--end
return M